home *** CD-ROM | disk | FTP | other *** search
/ Packard Bell - Multimedia…D & Packard Bell Library / Packard Bell Master CD.iso / diskimag / msdos62 / disk4.img / DBLBOOT.BA_ / DBLBOOT.bin
Text File  |  1993-09-30  |  3KB  |  107 lines

  1. @echo off
  2. rem Batch file to create a bootable, DoubleSpaced floppy.
  3.  
  4. set _AM=XXX
  5. if not "%_AM%"=="XXX" goto env_error
  6.  
  7. if "%1" == "/?" goto usage
  8. if not "%1" == "" goto start
  9.  
  10. :usage
  11. echo.
  12. echo Batch file to create a bootable, DoubleSpaced floppy. For use only with 
  13. echo high density (1.44 and 1.2 megabyte) diskettes. Lower density diskettes when
  14. echo DoubleSpaced do not have adequate uncompressed space for system files 
  15. echo required for booting.
  16. echo.
  17. echo Usage:  dblboot drive
  18. echo.
  19. goto end
  20.  
  21. :start
  22. echo.
  23. echo This batch file will create a bootable DoubleSpaced diskette on either
  24. echo a 1.44 megabyte 3.5 inch or 1.2 megabyte 5.25 inch floppy. Lower density
  25. echo DoubleSpaced diskettes do not have adequate uncompressed space for system
  26. echo files and should not be used.
  27. choice /c:yn "Do you wish to continue"
  28. if errorlevel 2 goto end
  29.  
  30. if "%1" == "a:" goto diskette
  31. if "%1" == "b:" goto diskette
  32. echo You have selected drive %1
  33. choice /c:yn "Is this correct"
  34. if errorlevel 2 goto end
  35.  
  36. :diskette
  37. SET _AM=OFF
  38. am %1 > NUL
  39. if errorlevel 1 SET _AM=ON
  40. am %1 OFF
  41. if errorlevel 1 goto am_error
  42. choice /c:ny "Is diskette already compressed"
  43. if errorlevel 2 goto nocompress
  44. choice /c:yn "Do you wish to format the diskette first"
  45. if errorlevel 2 goto noformat
  46.  
  47. echo. > c:\dblboot.tmp
  48. echo n >> c:\dblboot.tmp
  49. echo Formatting drive %1...
  50. if not exist c:\dblboot.tmp goto no_temp
  51. format %1 /v:dblboot /u < c:\dblboot.tmp > NUL
  52. del c:\dblboot.tmp > nul
  53. goto noformat
  54. :no_temp
  55. format %1 /u /q
  56. if errorlevel 1 goto format_error
  57.  
  58. :noformat
  59. dblspace /compress %1
  60. :nocompress
  61. dblspace /mount %1 > NUL
  62. dblspace /size /reserve=.2 %1
  63. copy c:\command.com %1
  64.  
  65. :mk_bootable
  66. dblspace /unmount %1 > NUL
  67.  
  68. :system
  69. sys %1
  70. rem create ini file on diskette
  71. deltree /y %1\dblspace.ini > nul
  72. echo MaxRemovableDrives=2 > %1\dblspace.ini
  73. echo FirstDrive=E >> %1\dblspace.ini
  74. echo LastDrive=I >> %1\dblspace.ini
  75. echo MaxFileFragments=117 >> %1\dblspace.ini
  76. echo ActivateDrive=I,A0 >> %1\dblspace.ini
  77. attrib %1\dblspace.ini +s +h +r
  78.  
  79. if "%_AM%"=="ON" am %1 on
  80. choice /c:yn "Mount new compressed drive now"
  81. if errorlevel 2 goto end
  82. dblspace /mount %1
  83.  
  84. goto end
  85.  
  86. :format_error
  87. echo .
  88. echo An error occured while attemting to format the diskette in drive %1.
  89. echo Please retry with a new diskette.
  90. echo .
  91. goto end
  92.  
  93. :env_error
  94. echo .
  95. echo ERROR: Not enough environment space to run DBLBOOT.BAT!
  96. echo .
  97. goto end
  98.  
  99. :am_error
  100. echo .
  101. echo An error occured while disabling dblspace automount.
  102. echo .
  103.  
  104. :end
  105. SET _AM=
  106.  
  107.